Skip to content

Add support for Pip's extra dependencies in YAML config. #2368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 24, 2016
Merged

Add support for Pip's extra dependencies in YAML config. #2368

merged 1 commit into from
Aug 24, 2016

Conversation

kdeldycke
Copy link
Contributor

@kdeldycke kdeldycke commented Aug 16, 2016

Depends on: readthedocs/readthedocs-build#16.

Also closes #173.

@berkerpeksag
Copy link
Member

Thanks for the PR. test_extra_requirements doesn't pass now: See https://travis-ci.org/rtfd/readthedocs.org/jobs/152807544#L238 for details. I guess you also need to adjust the validate_python method in https://github.com/rtfd/readthedocs-build/blob/master/readthedocs_build/config/config.py#L204.

@kdeldycke
Copy link
Contributor Author

Thanks @berkerpeksag for the heads up. I overlooked the dependency to readthedocs-build. I'll try to push a PR there soon.

* Type: List

List of `extra requirements`_ sections to install, additionnaly to the
`package default dependencies`_. Only works if `python.pip_install` option
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python.pip_install

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in a2b1ef7.

@berkerpeksag
Copy link
Member

Both PRs look good to me, thanks! I added the WIP label since we need to get readthedocs/readthedocs-build#16 in first.

@kdeldycke
Copy link
Contributor Author

Just waiting for an answer about True vs. True and {0} vs. {} formatting. These are mostly nit-picking. Just tell me what to do and I'll commit it.

@kdeldycke
Copy link
Contributor Author

All comments have been addressed. I think this PR is ready to be merged.

Just waiting for readthedocs/readthedocs-build#16 now...

@kdeldycke
Copy link
Contributor Author

readthedocs/readthedocs-build#16 has been merged upstream thanks to @ericholscher .

Should we wait for a proper release of the readthedocs-build package on PyPi before we can move forward on this PR?

@ericholscher
Copy link
Member

ericholscher commented Aug 23, 2016

We can just update the pip requirements to point at the commit for now.

@berkerpeksag
Copy link
Member

Could you please squash the commits?

@kdeldycke
Copy link
Contributor Author

@ericholscher: yep, that what I preemptively did in 5af1222. Hence @berkerpeksag proposal to squash commits.

@kdeldycke
Copy link
Contributor Author

@berkerpeksag: oh, BTW, is that my job to squash the commits? Just tell me what to do. But while we're at it I just wanted to point out that GitHub is now allowing repository owners to merge PR and squash commits in one go with a simple click. See: https://github.com/blog/2141-squash-your-commits

@berkerpeksag
Copy link
Member

Yes, GitHub does the job for us now, but not every project use it by default. I sometimes forget to choose "Squash and merge" option for example :) So it would be nice to keep the history linear.

@kdeldycke
Copy link
Contributor Author

@berkerpeksag OK. Squashed all commits. Ready to be merged IMHO.

* Default: ``[]``
* Type: List

List of `extra requirements`_ sections to install, additionnaly to the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo here: additionnaly

@ericholscher
Copy link
Member

Will merge & fix typo. Thanks for the PR!

@ericholscher ericholscher merged commit f3f0ee9 into readthedocs:master Aug 24, 2016
@kdeldycke
Copy link
Contributor Author

Thanks @ericholscher for the merge! :)

@kdeldycke kdeldycke deleted the add-pip-extra-dependencies-yaml-support branch August 24, 2016 22:47
kdeldycke added a commit to kdeldycke/mail-deduplicate that referenced this pull request Aug 24, 2016
@kdeldycke
Copy link
Contributor Author

Sorry to bother you but, do we have an idea when this PR is going to hit the production servers of readthedocs.org?

@ericholscher
Copy link
Member

I can get it deployed today.

@kdeldycke
Copy link
Contributor Author

I can wait a week or two. There is no urgency as the target is some sort of non-existential open-source projects. Just wanted to give a quick feedback about the effect of the PR.

@ericholscher
Copy link
Member

Should be deployed now, let me know if it works :)

@kdeldycke
Copy link
Contributor Author

Sorry to bother you but I can't see any extra_requirements section being picked up by the build process. See this build, which I expected to use the corresponding readthedocs.yml config.

@ericholscher
Copy link
Member

Hmm, did this work locally? I will try and take a look at it this week.

On Sat, Aug 27, 2016 at 4:03 AM, Kevin Deldycke [email protected]
wrote:

Sorry to bother you but I can't see any extra_requirements section being
picked up by the build process. See this build
https://readthedocs.org/projects/maildir-deduplicate/builds/4342502/,
which I expected to use the corresponding readthedocs.yml config
https://github.com/kdeldycke/maildir-deduplicate/blob/7dfb8412fc1d6c7747527a41528edef73651f3d1/readthedocs.yml
.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#2368 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABjpnJAic-6etBcQEeus71fIZY5W76kks5qkBmSgaJpZM4Jl3Wa
.

Eric Holscher
Maker of the internet residing in Portland, Oregon
http://ericholscher.com

@kdeldycke
Copy link
Contributor Author

@ericholscher Sorry. I just relied on unit-tests to cover this feature.

@skirpichev
Copy link
Contributor

@kdeldycke, doesn't work for me too, see #2432

@skirpichev
Copy link
Contributor

@ericholscher, @kdeldycke - it seems this does work for me on the local setup.

Here is the part of build log:

[07/Oct/2016 05:47:56] INFO [readthedocs.doc_builder.environments:102] Running: 'python /home/sk/rtd/checkouts/readthedocs.org/user_builds/diofant/envs/latest/bin/pip install --use-wheel -U --cache-dir /home/sk/rtd/checkouts/readthedocs.org/user_builds/diofant/.cache/pip sphinx==1.3.5 Pygments==2.1.3 setuptools==20.1.1 docutils==0.12 mkdocs==0.15.0 mock==1.0.1 pillow==2.6.1 git+https://github.com/rtfd/[email protected]#egg=readthedocs-sphinx-ext sphinx-rtd-theme==0.1.9 alabaster>=0.7,<0.8,!=0.7.5 commonmark==0.5.4 recommonmark==0.1.1' [/home/sk/rtd/checkouts/readthedocs.org]

[07/Oct/2016 05:49:57]"POST /api/v2/command/ HTTP/1.1" 201 8163
[07/Oct/2016 05:49:57] INFO [readthedocs.doc_builder.environments:102] Running: 'python /home/sk/rtd/checkouts/readthedocs.org/user_builds/diofant/envs/latest/bin/pip install --ignore-installed --cache-dir /home/sk/rtd/checkouts/readthedocs.org/user_builds/diofant/.cache/pip .[docs]' [/home/sk/rtd/checkouts/readthedocs.org/user_builds/diofant/checkouts/latest]

And in the web interface I have the following line:

python /home/sk/rtd/checkouts/readthedocs.org/user_builds/diofant/envs/latest/bin/pip install --ignore-installed --cache-dir /home/sk/rtd/checkouts/readthedocs.org/user_builds/diofant/.cache/pip .[docs]

Please notice docs extra dependence and c.f. with the build on the rtfd.org (just plain pip install .):
http://readthedocs.org/projects/diofant/builds/4462416/
For funny reasons this build still was successful (some caching?), build most recent rebuilding from the same master commit was failed: http://readthedocs.org/projects/diofant/builds/4484132/

@ericholscher, Are you sure that the recent readthedocs-build was actually deployed?

@kdeldycke
Copy link
Contributor Author

Thanks @skirpichev for the feedback! Also suspecting a deployment issue on RTD production server since the beginning.

@skirpichev
Copy link
Contributor

@ericholscher, support for .readthedocs.yml doesn't work too after recent update (#2442), so I bet the readthedocs-build package wasn't updated in production. Could you check that?

@skirpichev
Copy link
Contributor

Ok, now this finally works. I'll close #2432.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: work in progress Pull request is not ready for full review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support setuptools/distribute extras dependencies
4 participants